const app = getApp();
Component({
	/**
	 * 组件的属性列表
	 */
	properties: {

	},

	/**
	 * 组件的初始数据
	 */
	data: {
		indextips: false
	},

	lifetimes:{
	   attached() {
		   // app.storage.remove("indextips");
		   app.storage.get("indextips").then((indextips) => {
			   if (indextips) {
				   this.setData({indextips: false});
			   } else {
				   this.setData({indextips: true});
			   }
		   });
	   }
	},

	/**
	 * 组件的方法列表
	 */
	methods: {

		jumpcard: function () {
			app.storage.set("indextips", "midautumn");
			wx.navigateTo({
				url: '/pages/theme/mid-autumn/mid-autumn'
			});
		},
		cancels: function () {
			app.storage.set("indextips", "midautumn");
			this.setData({indextips: false});
		},
	}
})
